home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / fgl110c.zip / 09-27.C < prev    next >
Text File  |  1992-01-31  |  669b  |  34 lines

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main(void);
  6.  
  7. void main()
  8. {
  9.    int new_mode, old_mode;
  10.  
  11.    new_mode = fg_bestmode(320,200,1);
  12.    if (new_mode < 0 || new_mode == 12) {
  13.       printf("This program requires a 320 ");
  14.       printf("x 200 color graphics mode.\n");
  15.       exit(1);
  16.       }
  17.    old_mode = fg_getmode();
  18.    fg_setmode(new_mode);
  19.  
  20.    fg_setcolor(7);
  21.    fg_rect(0,159,0,99);
  22.    fg_setcolor(9);
  23.    fg_locate(6,6);
  24.    fg_text("quadrant",8);
  25.    fg_waitkey();
  26.  
  27.    fg_transfer(0,159,0,99,160, 99,0,0);
  28.    fg_transfer(0,319,0,99,  0,199,0,0);
  29.    fg_waitkey();
  30.  
  31.    fg_setmode(old_mode);
  32.    fg_reset();
  33. }
  34.